﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CPSite.Master" AutoEventWireup="true" CodeBehind="NewsDetails.aspx.cs" Inherits="WebTemplate.ControlPanel.NewsDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset>
        <legend>News Details</legend>
        <div class="form">
            <p>
                <asp:Label runat="server" Text="Title" AssociatedControlID="txtTitle"></asp:Label>
                <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtTitle" ErrorMessage="This Field Is Requied"></asp:RequiredFieldValidator>

            </p>
            <p>
                <asp:Label runat="server" Text="Short Description" AssociatedControlID="txtShortDescription"></asp:Label>
                <asp:TextBox ID="txtShortDescription" runat="server" TextMode="MultiLine" Rows="10"></asp:TextBox>
            </p>
            <p>
                <asp:Label runat="server" Text="Content" AssociatedControlID="txtContent"></asp:Label>
                <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Rows="10"></asp:TextBox>
            </p>
            <p>
                <asp:Label runat="server" Text="Image" AssociatedControlID="txtImage"></asp:Label>
                <asp:FileUpload ID="txtImage" runat="server"/>
                <asp:RegularExpressionValidator ID="regexValidator" runat="server"
                    ControlToValidate="txtImage"
                    ErrorMessage="Only JPEG images are allowed"
                    ValidationExpression="(.*\.([Jj][Pp][Gg])|.*\.([Jj][Pp][Ee][Gg])$)">
                </asp:RegularExpressionValidator>
                <asp:Label runat="server" ID="StatusLabel" Text= ""></asp:Label>
            </p>
            <p>
                <asp:Label runat="server" Text="Date" AssociatedControlID="txtDate"></asp:Label>
                <asp:TextBox ID="txtDate" runat="server" TextMode="Date"></asp:TextBox>
            </p>
            <p>
                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="formbutton" OnClick="btnSave_Click" />
            </p>
        </div>
    </fieldset>
</asp:Content>
